<template>
	<view>
		<c-navBar title="营销数据"></c-navBar>
		
		
		<heardSeach></heardSeach>
		<van-list class="ranking-list" v-model:loading="loading" v-model:error="error" error-text="请求失败，点击重新加载"
			@load="Loads">

			<view class="ranking-item" v-for="(item,index) in 20" :key="index">
				<uni-row>
					<uni-col span="24" class="item">
						<text class="text-color-2">2024-06-21</text>
						<text class="text-color-6">【数据】</text>
					</uni-col>
					<uni-col span="8" class="item">
						<text class="text-color-1">新增微信：</text> 
						<text>10</text>
					</uni-col>
					<uni-col span="8" class="item">
						<text class="text-color-1">新增电话：</text>
						<text>10</text> 
					</uni-col>
					<uni-col span="8" class="item">
						<text class="text-color-1">体验人数：</text>
						<text>10</text>
					</uni-col>
					<uni-col span="8" class="item">
						<text class="text-color-1">报名人数：</text>
						<text>10</text>
					</uni-col> 
					<uni-col span="16" class="item">
						<text class="text-color-1">收入金额：</text>
						<text class="">10000￥ </text> 
					</uni-col>
				</uni-row>

			</view>

		</van-list>
	</view>
</template>

<script setup>
	import heardSeach from "../../components/heardSeach/index.vue"
	import {
		getTimeDate
	} from "../../utils/index.js"
	import {
		onLoad,
		onShow
	} from "@dcloudio/uni-app"
	import {
		ref,
		reactive
	} from "vue"
	const pramas = reactive({
		startTime: '',
		endTime: '',
		type: '',
		value: ''
	})


	const list = ref([]);
	const error = ref(false);
	const loading = ref(false);

	const actions = [{
			text: '入门测'
		},
		{
			text: '出门测'
		},
		{
			text: '阶段测'
		},
		{
			text: '模块测'
		},
	];
	onLoad(() => {
		// getTimeDate()
		let time = getTimeDate()
		pramas.endTime = new Date(time.year, time.month, time.day)
		pramas.startTime = new Date(time.year, time.month, time.day)
		timetext1.value = `${time.year}/${time.month}/${time.day}`
		timetext2.value = `${time.year}/${time.month}/${time.day}`
		console.log(time)
	})


	const onSelect = (action) => {

	}
	const Loads = () => {
		loading.value = false;
		error.value = false;
		// fetchSomeThing().catch(() => {
		//   loading.value = false;
		//   error.value = true;
		// }); 
	};
</script>

<style lang="scss" scoped>
	.ranking-list {
		width: 100vw;
		padding: 0 30rpx;

	}
text{
	font-size: 26rpx;
}
	.ranking-item {
		display: flex;
		flex-direction: column;
		width: 100%;
		margin-top: 32rpx;
		border: 1rpx solid rgba(236, 236, 236, 1);
		border-radius: 16rpx;
		padding: 30rpx;
		padding-bottom: 0;
	}
	.item{
		margin-bottom: 20rpx;
	}
</style>